Exception Handling with Resumption: Design and Implementation in Java
نویسندگان
چکیده
Nowadays, nearly every mainstram programming language includes an exception handling mechanism. Basically, the variety of these mechanisms can be devided in two groups according to their handling models: Mechanisms which support exception termination and those which support resumption. Even though resumption was still an attractive alternative to termination for the first exception handling mechanisms in the 1980s, it has nearly been displaced completely in contemporary languages by termination. Some reasons for this trend will be reviewed in this work. But in our opinion, they do not justify to reject resumption completely. To the contrary, resumption can simplify some tasks extremely while still being implementable with reasonable effort. To show this, we discuss some basic concepts of how a resumption mechanism should be designed in general and propose new syntactical constructs to support these concepts. Based on these concepts, we describe the implementation of a prototypical precompiler for Java supporting exception handling with resumption. In fact, the mechanism implemented in the precompiler not only extends, but completely subsumes the Java mechanism, for it is capable of both, termination and resumption. KEYWORDS— Flexible Exception Handling, Java, Resumption, Prototypical Implementation, Precompiler.
منابع مشابه
A Fully Object-Oriented Exception Handling System: Rationale and Smalltalk Implementation
This paper motivates and presents the specification and the implementation of an exception handling system for an dynamically typed object-oriented language. A full object-oriented representation of exceptions and handlers, a meta-object protocol to handle using either termination or resumption makes the system powerful as well as extendible and solves various exception handling issues. Three k...
متن کاملIntroducing Catch Arcs to Java Reference Nets
Modeling plays an important role during design and development of systems and processes. Petri nets allow for well-defined models that can be executed. For the implementation of these systems, however, still normal programming languages are used. In contrast, modeling languages – also if executable, such as Petri net formalisms – are not deemed fit for implementation. Besides the pragmatic powe...
متن کاملAdvanced Exception Handling Mechanisms
It is no longer possible to consider exception handling as a secondary issue in language design, or even worse, a mechanism added after the fact via a library approach. Exception handling is a primary feature in language design and must be integrated with other major features, including advanced control flow, objects, coroutines, concurrency, realtime and polymorphism. Integration is crucial as...
متن کاملAs-if-serial exception handling semantics for Java futures
Exception handling enables programmers to specify the behavior of a program when an exceptional event occurs at runtime. Exception handling, thus, facilitates software fault tolerance and the production of reliable and robust software systems. With the recent emergence of multi-processor systems and parallel programming constructs, techniques are needed that provide exception handling support i...
متن کاملAspects of Exceptions at the Meta-Level (Position Paper)
This paper describes the design and usage of a metaobject protocol that explicitly includes support for handling exceptions. We do not propose implementing exception mechanisms anew [3, 5] or proposing a unified meta-level software architecture for exception handling [4]. To make our discussion concrete we describe an extension of the Kava [9] metaobject protocol that includes exceptions as fir...
متن کامل